<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="dialog.css">
    <script src="dialog.js"></script>
</head>

<body>
    <!-- 阴影部分 -->
    <!-- <div class="wrapper"></div>
    <div class="dialog">
        <div class="header">
            <span class="title">提示</span><span class="close">X</span>
        </div>
        <div class="body">
            <span>这是一段文本</span>
            <input class="input-inner" type="text" />
        </div>
        <div class="footer">
            <span class="default">取消</span>
            <span class="primary">确定</span>
        </div>
    </div> -->
    <button class="showDailog">点击</button>
</body>

<script>
    let dialog = new Dialog({
        width: '500px',
        height: '250px',
        title: "提示",
        content: "是否输入内容",
        dragable: true,//是否可拖拽
        maskable: true,//是否有遮罩
        isCancel: true,//是否有取消

        // 取消回调
        cancel() {
            console.log('点击取消');
        },
        // 确认回调 
        confirm() {
            console.log('点击确定');
        }
    })
    let showDailog = document.querySelector('.showDailog')
    showDailog.addEventListener('click', function () {
        dialog.open()
    })
</script>

</html>